<?php
/**
 * Created by PhpStorm.
 * User: yuliang
 * Date: 2017/6/5
 * Time: 下午5:23
 */

namespace app\common\validate;


use think\Validate;

class Teacher extends Validate
{
    protected $rule = [
        'id' => 'require|number',
        'name' => 'require',
        'type' => 'require',
        'description' => 'require',
        'education' => 'require',
        'mobile' => 'length:11',
        'email' => 'email',
    ];

    protected $scene = [
        'add' => ['name','type','description','education','mobile','email'],
        'edit' => ['id','name','type','description','education','mobile','email']
    ];
}